package com.music.checkpoints.common.amqp.consumber;

import com.music.checkpoints.common.amqp.event.SubmitAnswerEvent;
import com.music.checkpoints.common.service.QuestionManager;
import com.music.checkpoints.common.vo.DetailVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class SubmitAnswerConsumer implements SubmitAnswerEvent {
    @Autowired
    private QuestionManager questionManager;

    @Override
    public void submitAnswer(DetailVO detailVO) {
        questionManager.saveAnswerDetail(detailVO);
    }
}
